<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>练习2</title>
  </head>
  <body>
    <script>

      // 打印图案1
      
      /*
       *****
       *****
       *****
       *****
       *****
       */
      //   for (i = 0; i < 5; i++) {
      //     document.write("*****<br/>");
      //   }


      
      // 打印图案2

      /*

       *
       **
       ***
       ****
       *****

       */
      for (i = 0; i < 5; i++) {
        for (j = 0; j < i + 1; j++) {
          document.write("*");
        }
        document.write("<br/>");
      }
    </script>
  </body>
</html>
